/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model.Entity.Web;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author user12
 */
@Entity
@Table(name = "WEB_STAFF_INFO")
@NamedQueries({
    @NamedQuery(name = "WebStaffInfo.findAll", query = "SELECT w FROM StaffInfo w"),
    @NamedQuery(name = "WebStaffInfo.findByInstructorId", query = "SELECT w FROM StaffInfo w WHERE w.instructorId = :instructorId"),
    @NamedQuery(name = "WebStaffInfo.findByPhotoPath", query = "SELECT w FROM StaffInfo w WHERE w.photoPath = :photoPath")})
public class StaffInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "INSTRUCTOR_ID")
    private Integer instructorId;
    @Size(max = 4000)
    @Column(name = "PHOTO_PATH")
    private String photoPath;
    @Lob
    private String cv;
    @Lob
    private String researches;
    @Lob
    private String publications;
    @Lob
    private String links;

    public StaffInfo() {
    }

    public StaffInfo(Integer instructorId) {
        this.instructorId = instructorId;
    }

    public Integer getInstructorId() {
        return instructorId;
    }

    public void setInstructorId(Integer instructorId) {
        this.instructorId = instructorId;
    }

    public String getPhotoPath() {
        return photoPath;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public String getCv() {
        return cv;
    }

    public void setCv(String cv) {
        this.cv = cv;
    }

    public String getResearches() {
        return researches;
    }

    public void setResearches(String researches) {
        this.researches = researches;
    }

    public String getPublications() {
        return publications;
    }

    public void setPublications(String publications) {
        this.publications = publications;
    }

    public String getLinks() {
        return links;
    }

    public void setLinks(String links) {
        this.links = links;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (instructorId != null ? instructorId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof StaffInfo)) {
            return false;
        }
        StaffInfo other = (StaffInfo) object;
        if ((this.instructorId == null && other.instructorId != null) || (this.instructorId != null && !this.instructorId.equals(other.instructorId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.WebStaffInfo[ instructorId=" + instructorId + " ]";
    }
    
}
